// 引入css
require("../css/advertise.css");
// 引入动画
require("animate.css");

//todo dom的入口事件
document.ready(function () {
    // *获取元素
    const sec = document.querySelector(".sec");
    const skip = document.querySelector(".skip");

    // ?倒计时5秒后 跳转页面
    let i = 5;
    sec.innerHTML = i + "s";
    let timerId = setInterval(function () {
        i--;
        if (i <= 0) {
            clearInterval(timerId);
            window.location.href = "./login.html";
        }
        sec.innerHTML = i + "s";
    }, 1000)
    skip.addEventListener("click", function () {
        clearInterval(timerId);
        window.location.href = "./login.html";

    })
})
